import request from "@/util/request";

export function adminAddBook(bookBo) {
  return request({
    url: "/admin/book/add",
    method: "post",
    data: bookBo,
  });
}

export function adminGetBookWordLineCount(bookId) {
  return request({
    url: "/admin/book/book-count/" + bookId,
    method: "get",
  });
}

export function adminUpdateBook(bookBo) {
  return request({
    url: "/admin/book/update",
    method: "post",
    data: bookBo,
  });
}

export function adminDeleteBook(bookIdList) {
  return request({
    url: "/admin/book/delete",
    method: "post",
    data: bookIdList,
  });
}

export function getPresetWordListByBookId(queryParams) {
  return request({
    url: "/admin/book/list-word-by-book",
    method: "post",
    data: queryParams,
  });
}

export function removeWordLineFromBook(queryParams) {
  return request({
    url: "/admin/book/remove-wordline",
    method: "post",
    data: queryParams,
  });
}